package chap7;

public class StringsDemo{
    public static void main(String arg[]){
        String p="Dot saw I was Tod";
        int len=p.length();
        StringBuffer dest=new StringBuffer(len);
        for (int i=(len-1);i>=0;i--){
            dest.append(p.charAt (i));
            }
        System.out.println(dest.toString());
        }
    }